-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: region and variable naming update #1304
Conversation
✅ Deploy Preview for detroit-partners-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-public-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@ColinBuyck Sorry I think I just gave you merge conflicts here 😅 |
@emilyjablonski They should be resolved now! Only thing I am still wondering is about the backend changes made to reflect the new wording. I figured it would be helpful to ensure consistency across the app rather than have conditionals to change 'Greater Downtown' to 'Downtown' for values, but unsure if there would be unintended consequences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need an update to the migration file - lmk if you have any questions!
@@ -21,9 +21,9 @@ export class addPropertyRegion1649062179928 implements MigrationInterface { | |||
{ name: "Farwell area", region: Region.Eastside }, | |||
{ name: "Gratiot Town/Kettering area", region: Region.Eastside }, | |||
{ name: "Gratiot/7 Mile area", region: Region.Eastside }, | |||
{ name: "Greater Corktown area", region: Region.Downtown }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making an update to an existing migration is a flow we can't use. It will work locally on a db:reseed
because this runs every single migration from the first, but once this gets to dev/production where we have an existing db, all the migration files are not run, just any new ones. You can test this locally by reseeding on dev, and then on this branch just running yarn db:migration:run
to test what would happen in our environments. I'd suggest keeping the update to the region-enum
and then running yarn db:migration:generate -n 'region-rename'
and the backend will auto-generate a new migration file for you based on whatever changes were made. Sometimes doing this results in some extra db queries we don't always need, so some things may need to be removed other than altering the enum.
✅ Deploy Preview for detroit-storybook-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
* fix: region and variable naming update * fix: updated related tests * fix: mantain full set of neighborhoods * fix: new migration file * fix: migration for existing Downtown data * fix: remove region typing from seed * fix: update script to pass unit tests * fix: contain all migration fixes to new file
Issue
This issue involved changing 'Downtown' to 'Greater Downtown', and removing 'Midtown' from the site. Since the naming and region options were directly linked with the search params, I decided to make these adjustments in the variable names and backend files so that it could maintain the approach to search and filtering it had before.
This can be tested in three main areas. On the Detroit public site, verify that the region cards on the home page do not show "Midtown" and show "Greater Downtown". Then, navigate to the list of rentals and open the filtering drawer. In the dropdown for region you should see the two adjustments mentioned above.
Lastly, navigate to the partner's portal and begin creating a new listing. From there, you should see the updated region information in the dropdown.
Checklist:
yarn generate:client
and/or created a migration if I made backend changes that require themReviewer Notes:
Steps to review a PR:
On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.